package com.liarjo.mywebsiteapi.admin.controller.login;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/admin/login")
public class AdminLoginController {
    @Autowired
    private AdminLoginService loginService;

    @PostMapping
    public AdminLoginResult login(@RequestBody AdminLoginRequest loginRequest) {
        return loginService.login(loginRequest);
    }
}
